unit detalleSueldos;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Provider, SqlExpr, DB, DBClient, DBLocal, DBLocalS, Grids,
  DBGrids, RXDBCtrl;

type
  TfrmDetalleSueldos = class(TForm)
    grdVarSueldos: TRxDBGrid;
    cds: TSQLClientDataSet;
    s: TDataSource;
    cdsFECHA: TSQLTimeStampField;
    cdsCANTIDAD: TFloatField;
    cdsENMANO: TFloatField;
    cdsCARGASOCIAL: TFloatField;
    cdsADICIONAL: TFloatField;
    cdsID_OPERARIO: TSmallintField;
    cdsTOTALENMANO: TFloatField;
    cdsTOTALGRAL: TFloatField;
    procedure grdVarSueldosTitleClick(Column: TColumn);
  private
    { Private declarations }
  public
    constructor CreateNuevo(AOwner: TComponent; ini, fin, apenom: string; id: integer);
  end;

var
  frmDetalleSueldos: TfrmDetalleSueldos;

implementation

uses MDatos;

{$R *.dfm}

{ TfrmDetalleSueldos }

constructor TfrmDetalleSueldos.CreateNuevo(AOwner: TComponent; ini,
  fin, apenom: string; id: integer);
begin
  inherited Create(Aowner);
  self.Caption := 'Detalle de sueldos: '+apenom;
  self.cds.Params [0].AsInteger := id;
  self.cds.Params [1].AsString := ini;
  self.cds.Params [2].AsString := fin;
  self.cds.Open;
  self.ShowModal;
end;

procedure TfrmDetalleSueldos.grdVarSueldosTitleClick(Column: TColumn);
begin
  self.cds.IndexFieldNames := Column.FieldName;
end;

end.
